from django.db import models


# Create your models here.

class Stock(models.Model):
    code = models.CharField(max_length=255, verbose_name="代码", null=True)
    name = models.CharField(max_length=255, verbose_name="名称", null=True)


class StockDetail(models.Model):
    # 日期,开盘,收盘,最高,最低,成交量,成交额,振幅,涨跌幅,涨跌额,换手率
    code = models.CharField(max_length=255, verbose_name="代码", null=True)
    date = models.DateTimeField(verbose_name="日期", null=True)
    open = models.FloatField(verbose_name="开盘", null=True)
    close = models.FloatField(verbose_name="收盘", null=True)
    high = models.FloatField(verbose_name="最高", null=True)
    low = models.FloatField(verbose_name="最低", null=True)
    turnover = models.FloatField(verbose_name="成交量", null=True)
    volume = models.FloatField(verbose_name="成交额", null=True)
    amplitude = models.FloatField(verbose_name="振幅", null=True)
    Chg = models.FloatField(verbose_name="涨跌幅", null=True)
    change_amount = models.FloatField(verbose_name="涨跌额", null=True)
    turnover_rate = models.FloatField(verbose_name="换手率", null=True)
